import {
  GraphQLList,
  GraphQLObjectType,
  GraphQLSchema,
  GraphQLString,
  GraphQLInt,
  GraphQLFloat,
  GraphQLEnumType,
  GraphQLNonNull,
  GraphQLID
} from 'graphql';
import StockType from './StockBasicsType'

export default new GraphQLObjectType({
  name: 'Category',
  description: '行业分类',
  fields: {
    code: {
      type: new GraphQLNonNull(GraphQLString),
      description: '行业分类代码'
    },
    name: {
      type: new GraphQLNonNull(GraphQLString),
      description: GraphQLString
    },
    description: {
      type: GraphQLString,
      description: '行业分类描述'
    },
    stocks: {
      type: new GraphQLList(StockType),
      description: '行业分类包含的股票'
    }
  }
})
